#ifndef OSTASK_H
#define OSTASK_H

#include <QDate>
#include <QString>
#include <QVector>
#include <QDataStream>

const int visibleFields = 4;

class OSTask
{
private:
    QString name;
    QString description;
    int algorithm;
    QDate lastExecution;

    int n, m; //n - detali, m - stanki.
    QVector<QVector<int> > input;
    QVector<QVector<int> > schedule;

public:
    OSTask();

    void setName( const QString& name ) { this->name = name; }
    void setDescription( const QString& descr ) { this->description = descr; }
    void setAlgorithm( int algo ) { algorithm = algo; }
    void setLastExecution( const QDate& date ) { lastExecution = date; }
    void setInput( int n, int m, const QVector<QVector<int> >& in );

    QString getName() { return name; }
    QString getDescription() { return description; }
    int getAlgorithm() { return algorithm; }
    QDate getLastExecution() { return lastExecution; }
    void getInput( QVector<QVector<int> >& in );

    QDataStream & operator<< (QDataStream & out);
    QDataStream & operator>> (QDataStream & in);
};

#endif // OSTASK_H
